#pragma once

#include <stdint.h>
#include <map>
#include <vector>
#include <set>
#include <queue>

#ifdef _MSC_VER
#pragma warning(push)
#pragma warning(disable:4512) //assignment operator could not be generated
#pragma warning(disable:4244) //conversion from '__int64' to 'int', possible loss of data
#pragma warning(disable:4267) //conversion from 'size_t' to 'int', possible loss of data
#pragma warning(disable:4127) //conditional expression is constant
#endif

#include "AllProtocol.h"
#pragma pack(push)
#pragma pack(1)


enum AchievementStatus
{
	ACHIEVEMENT_STATUS_NONE = 0,//成就状态空
	ACHIEVEMENT_STATUS_NOT_COMPLETE = 1,
	ACHIEVEMENT_STATUS_NOT_REWARD = 2,
	ACHIEVEMENT_STATUS_REWARD = 3,
};

enum AchievementType
{
	ACHIEVEMENT_TYPE_NONE,
	ACHIEVEMENT_TYPE_PERSION = 1,		//个人成就
	ACHIEVEMENT_TYPE_SOCIAL = 2,		//社交成就
	ACHIEVEMENT_TYPE_EQUIP = 3,			//装备成就
	ACHIEVEMENT_TYPE_ADVENTURE = 4,		//冒险成就
	ACHIEVEMENT_TYPE_NUM,
};

//成就事件类型(主类型)
enum EAEventType
{
	/*= == == == == == == == == == 个人成就 == == == == == == == == == == == == = */
	EAEventType_Property = 1,			//个人属性
	EAEventType_Gather_Develop = 20,	//个人收集养成

	/*= == == == == == == == == == 社交成就 == == == == == == == == == == == == = */
	EAEventType_CampSocial = 3,			//阵营社交
	EAEventType_Socail = 5,				//个人社交
	EAEventType_Camp_Union = 21,		//个人阵营公会

	/*= == == == == == == == == == 装备成就 == == == == == == == == == == == == = */
	EAEventType_Refine = 7,				//精炼系统
	EAEventType_Stone = 8,				//宝石系统
	EAEventType_Equip_Develop = 22,		//个人装备养成

	/*= == == == == == == == == == 冒险成就 == == == == == == == == == == == == = */
	EAEventType_Mission = 11,			//任务系统
	EAEventType_Duplicate = 13,			//副本系统
	EAEventType_Arena = 14,				//竞技场成就
	EAEventType_Nuolin_Risk = 23,		//个人诺林冒险


	EAEventType_RecoverProperty = 2,		//恢复属性
	EAEventType_FactionSocial = 4,		//帮派社交
	EAEventType_Stren = 6,		//强化系统
	EAEventType_Spirit = 9,		//精灵系统
	EAEventType_Player = 10,		//人物系统
	EAEventType_KilMon = 12,		//杀怪成就
	EAEventType_Sign = 15,		//签到成就
	EAEventType_NormalAvocation = 16,		//采集副业技能升级
	EAEventType_MakeAvocation = 17,			//打造副业技能升级
	EAEventType_SpecialAvocation = 18,		//特殊打造
	EAEventType_MakeAvocationItem = 19,		//副业制造
};

//成就事件类型(主类型)
/*
enum EAEventType
{
	//===================个人成就=========================
	EAEventType_Property = 1,				//个人属性
	EAEventType_RecoverProperty = 2,		//恢复属性

	//===================社交成就=========================
	EAEventType_CampSocial = 3,			//阵营社交
	EAEventType_FactionSocial = 4,		//帮派社交
	EAEventType_Socail = 5,				//个人社交

	//===================养成成就=========================
	EAEventType_Stren = 6,		//强化系统
	EAEventType_Refine = 7,		//精炼系统
	EAEventType_Stone = 8,		//宝石系统
	EAEventType_Spirit = 9,		//精灵系统
	EAEventType_Player = 10,		//人物系统


	//===================普通成就=========================
	EAEventType_Mission = 11,	//任务系统
	EAEventType_KilMon = 12,		//杀怪成就
	EAEventType_Duplicate = 13,	//副本系统
	EAEventType_Arena = 14,		//竞技场成就
	EAEventType_Sign = 15,		//签到成就


	//===================副业成就=========================
	EAEventType_NormalAvocation = 16,		//采集副业技能升级
	EAEventType_MakeAvocation = 17,			//打造副业技能升级
	EAEventType_SpecialAvocation = 18,		//特殊打造
	EAEventType_MakeAvocationItem = 19,		//副业制造


	EAEventType_Gather_Develop = 20,	//个人收集养成
	EAEventType_Camp_Union = 21,		//个人阵营公会
	EAEventType_Equip_Develop = 22,		//个人装备养成
	EAEventType_Nuolin_Risk = 23,		//个人诺林冒险
};*/

/*===================个人属性=========================*/
enum PARAMETER_TYPE_PROPERTY_Parameter
{
	PARAMETER_TYPE_PROPERTY_LEVEL = 1,			//等级达到xx级
	PARAMETER_TYPE_PROPERTY_FIGHT = 2,			//战力达到xxx
	PARAMETER_TYPE_PROPERTY_ATTACH = 3,			//角色任意一项攻击达到xx
	PARAMETER_TYPE_PROPERTY_DEFENSE = 4,		//角色任意一项防御达到xx
	PARAMETER_TYPE_PROPERTY_LIFE = 5,			//角色生命值达到xx
	PARAMETER_TYPE_PROPERTY_ADD_COIN = 6,		//累计获得xx金币
	PARAMETER_TYPE_PROPERTY_SUB_COIN = 7,		//累计消耗xx金币
};

/*===================恢复属性=========================*/
enum PARAMETER_TYPE_RECOVERPROPERTY_Parameter
{
	PARAMETER_TYPE_RECOVERPROPERTY_LIFE = 1,		//累计恢复xx点生命值
	PARAMETER_TYPE_RECOVERPROPERTY_MAGIC = 2,		//累计恢复xx点魔法值
	PARAMETER_TYPE_RECOVERPROPERTY_COMPOSE = 3,		//累计合成特定道具xx个
	PARAMETER_TYPE_RECOVERPROPERTY_FASHION = 4,		//累计获得指定时装xx件
	PARAMETER_TYPE_RECOVERPROPERTY_USEGOODS = 5,	//使用特定食物xx个
	PARAMETER_TYPE_RECOVERPROPERTY_USEMEDICINE = 6,	//使用特定药物xx个
};

/*===================阵营社交=========================*/
enum PARAMETER_TYPE_CAMPSOCIAL_Parameter
{
	PARAMETER_TYPE_CAMPSOCIAL_ADDCONTRIBUTION = 1,	//累计获得xx点阵营军功
	PARAMETER_TYPE_CAMPSOCIAL_KILLENEMY	= 2,		//累计完成xx次阵营斩杀
	PARAMETER_TYPE_CAMPSOCIAL_ADDINTEGRAL = 3,		//阵营战累计获得xx积分	???
	PARAMETER_TYPE_CAMPSOCIAL_PEERAGE = 4,			//达到阵营某爵位
	PARAMETER_TYPE_CAMPSOCIAL_CHANGECAMP = 5,		//转了xx次阵营
	//PARAMETER_TYPE_CAMPSOCIAL_OFFCIAL = 6,			//达到阵营某官职
	//PARAMETER_TYPE_CAMPSOCIAL_PRAYER = 7,			//朝拜指定神灵xx次【ID，值】
};

/*===================帮派社交=========================*/
enum PARAMETER_TYPE_FACTIONSOCIAL_Parameter
{
	PARAMETER_TYPE_FACTIONSOCIAL_ADDCONTRIBUTION = 1,	//累计获得xx帮贡点
	PARAMETER_TYPE_FACTIONSOCIAL_SKILL = 2,				//任意帮派技能升到xx级
	PARAMETER_TYPE_FACTIONSOCIAL_PRACTICE = 3,			//帮派修炼达到xx级
	PARAMETER_TYPE_FACTIONSOCIAL_SUBCONTRIBUTION = 4,	//公会祭坛充能多少次								??
	PARAMETER_TYPE_FACTIONSOCIAL_SUPPLY = 5,			//获得与发放xx点公会补给【1获得，2发放】			??
	PARAMETER_TYPE_FACTIONSOCIAL_ESCORT = 6,			//押送个人镖车和公会镖车xx次【1个人，2公会】
};

/*===================个人社交=========================*/
enum PARAMETER_TYPE_SOCIAL_Parameter
{
	PARAMETER_TYPE_SOCIAL_EVIL = 1,					//善恶值(杀气值)达到xx点
	PARAMETER_TYPE_SOCIAL_ADDTRADINGCOIN = 2,		//交易获得xx金币
	PARAMETER_TYPE_SOCIAL_DECTRADINGCOIN = 3,		//交易付出xx金币
	PARAMETER_TYPE_SOCIAL_FRIENDNUMBER = 4,			//好友数量达到xx
	PARAMETER_TYPE_SOCIAL_WORLDCHAT = 5,			//世界频道聊天xx句
	PARAMETER_TYPE_SOCIAL_FRIENDSENDGIFT = 6,		//为好友送礼xx次
	PARAMETER_TYPE_SOCIAL_GETTITLE = 7,				//获得xx个称号
	PARAMETER_TYPE_SOCIAL_GETSPECIFICTITLE = 8,		//获得指定的称号
	//PARAMETER_TYPE_SOCIAL_DEAD = 9,					//死亡次数累计【1.怪物杀死2.玩家杀死】
};

/*===================强化系统=========================*/
enum PARAMETER_TYPE_STREN_Parameter
{
	/*PARAMETER_TYPE_STREN_WEAPON = 1,					//武器强化至xx级
	PARAMETER_TYPE_STREN_ARMOUR = 2,					//服饰强化至xx级
	PARAMETER_TYPE_STREN_ALLEQUIP = 3,					//全身装备槽位均强化至xx级
	PARAMETER_TYPE_STREN_RECASTEQUIP = 4,				//分解xx件装备
	PARAMETER_TYPE_STREN_USESTONE = 5,					//累计消耗xx个强化石*/
	PARAMETER_TYPE_GOD_LEVELUP = 1,						//神格提升至xx级
	PARAMETER_TYPE_STREN_RECASTEQUIP = 2,				//分解xx件装备
	PARAMETER_TYPE_GOD_COST = 3,						//累计消耗xx个神格晶石
};

/*===================精炼系统=========================*/
enum PARAMETER_TYPE_REFINE_Parameter
{
	PARAMETER_TYPE_REFINE_EQUIP = 1,					//将任意1件装备精炼至xx级
	PARAMETER_TYPE_REFINE_ALLEQUIP = 2,					//全身装备均精炼至xx级
	PARAMETER_TYPE_REFINE_USESTONE = 3,					//累计消耗xx个特定精炼石
};

/*===================宝石系统=========================*/
enum PARAMETER_TYPE_STONE_Parameter
{
	PARAMETER_TYPE_STONE_GAIN = 1,						//获得一个xx级以上宝石
	PARAMETER_TYPE_STONE_COMPOSE = 2,					//合成xx个宝石  完成宝石合成xx次
	PARAMETER_TYPE_STONE_INLAY = 3,						//总共镶嵌xx个宝石
};

/*===================精灵系统=========================*/
enum PARAMETER_TYPE_SPIRIT_Parameter
{
	PARAMETER_TYPE_SPIRIT_GET = 1,						//累计获得xx个精灵
	PARAMETER_TYPE_SPIRIT_FEED = 2,						//累计喂食精灵xx次
	PARAMETER_TYPE_SPIRIT_LEVEL = 3,					//任意精灵达到xx等级
	PARAMETER_TYPE_SPIRIT_FIGHT = 4,					//任意精灵战斗力达到xx
};

/*===================人物系统=========================*/
enum PARAMETER_TYPE_PLAYER_Parameter
{
	PARAMETER_TYPE_PLAYER_CONSTELLATION = 1,			//某星座全部突破完成
	PARAMETER_TYPE_PLAYER_ATTR = 2,						//自由分配xx点属性
	PARAMETER_TYPE_PLAYER_SKILLLEVEL = 3,				//任意技能升到xx级
};

/*===================任务系统=========================*/
enum PARAMETER_TYPE_MISSION_Parameter
{
	PARAMETER_TYPE_MISSION_SUBMIT = 1,					//完成指定任务
	PARAMETER_TYPE_MISSION_RINGSUBMIT = 2,				//累计完成xx环任务
	PARAMETER_TYPE_MISSION_CAMPSUBMIT = 3,				//累计完成xx个阵营任务
	PARAMETER_TYPE_MISSION_FAMILYSUBMIT = 4,			//累计完成xx环帮派任务
};

/*===================杀怪成就=========================*/
enum PARAMETER_TYPE_KILL_MONSTER_Parameter
{
	PARAMETER_TYPE_KILL_MONSTER = 1,					//击杀xx只怪物
	PARAMETER_TYPE_KILL_MONSTERID = 2,					//击杀xx只指定ID的怪物
	PARAMETER_TYPE_KILL_MONSTERBOSS = 3,				//击杀xx只boss
};

/*===================副本系统=========================*/
enum PARAMETER_TYPE_DUPLICATE_Parameter
{
	PARAMETER_TYPE_DUPLICATE_PASS = 1,					//通关指定副本
	PARAMETER_TYPE_DUPLICATE_SPECIFICPASS = 2,			//通关指定副本xx次
	//PARAMETER_TYPE_ACTIVITY_SUCESS = 3,					//指定活动胜利xx次
};

/*===================竞技场成就=========================*/
enum PARAMETER_TYPE_ARENA_Parameter
{
	PARAMETER_TYPE_ARENA_CRAWL = 1,						//竞技场爬到xx层以上
	PARAMETER_TYPE_ARENA_SCUESS = 2,					//竞技场累计胜利xx次
	PARAMETER_TYPE_ARENA_FAIL = 3,						//竞技场累计失败xx次
	PARAMETER_TYPE_ARENA_COMPLETE = 4,					//完成xx次竞技场
	//PARAMETER_TYPE_ARENA_SCORE = 5,						//累计获得xx点竞技场积分
};

/*===================签到成就=========================*/
enum PARAMETER_TYPE_SIGN_Parameter
{
	PARAMETER_TYPE_SIGN_TOTAL = 1,						//累计签到xx天
	PARAMETER_TYPE_SIGN_SERIAL = 2,						//连续签到xx天
	PARAMETER_TYPE_SIGN_RECHARGE = 3,					//累计充值xx钻石	??
	PARAMETER_TYPE_SIGN_VIP = 4,						//游戏VIP达到xx级	??
};

/*===================采集副业技能升级=========================*/
enum PARAMETER_TYPE_NORMALAVOCATION_Parameter
{
	PARAMETER_TYPE_NORMALAVOCATION_MEDICINESKILL = 1,	//采药技能达到xx级
	PARAMETER_TYPE_NORMALAVOCATION_FISHSKILL = 2,		//垂钓技能达到xx级
	PARAMETER_TYPE_NORMALAVOCATION_MINESKILL = 3,		//挖矿技能达到xx级
	PARAMETER_TYPE_NORMALAVOCATION_STRIPPESKILL = 4,	//剥取技能达到XX级
};

/*===================打造副业技能升级=========================*/
enum PARAMETER_TYPE_MAKEAVOCATION_Parameter
{
	PARAMETER_TYPE_MAKEAVOCATION_CAST = 1,				//铸造达到xx级
	PARAMETER_TYPE_MAKEAVOCATION_SEWING = 2,			//缝纫达到xx级
	PARAMETER_TYPE_MAKEAVOCATION_SMELT = 3,				//冶炼达到xx级
	PARAMETER_TYPE_MAKEAVOCATION_COOK = 4,				//烹饪达到xx级
	PARAMETER_TYPE_MAKEAVOCATION_PHARMACY = 5,			//制药达到xx级
	PARAMETER_TYPE_MAKEAVOCATION_SRARSOUL = 6,			//星魂达到xx级
};

/*===================特殊打造=========================*/
enum PARAMETER_TYPE_SPECIALAVOCATION_Parameter
{
	PARAMETER_TYPE_SPECIALAVOCATION_EQUIP = 1,			//总共打造出xx件金色装备
	PARAMETER_TYPE_SPECIALAVOCATION_MEDICINE = 2,		//制造出一瓶指定药品
};

/*===================副业制造=========================*/
enum PARAMETER_TYPE_MAKEDEPUTY_ITEM_Parameter
{
	PARAMETER_TYPE_MAKEDEPUTY_CAST_ITEM_Parameter = 1,		//铸造xx物品xx个
	PARAMETER_TYPE_MAKEDEPUTY_SEWING_ITEM_Parameter = 2,	//缝纫xx物品xx个
	PARAMETER_TYPE_MAKEDEPUTY_SMELT_ITEM_Parameter = 3,		//冶炼xx物品xx个
	PARAMETER_TYPE_MAKEDEPUTY_COOK_ITEM_Parameter = 4,		//烹饪xx物品xx个
	PARAMETER_TYPE_MAKEDEPUTY_PHARMACY_ITEM_Parameter = 5,	//制药xx物品xx个
	PARAMETER_TYPE_MAKEDEPUTY_STARSOUL_ITEM_Parameter = 6,	//星魂xx物品xx个
};

/*===================个人收集养成=========================*/
enum PARAMETER_TYPE_GATHER_DEVELOP_Parameter
{
	PARAMETER_TYPE_GATHER_DEVELOP_GOD_TOTAL_LEL = 1,				//神格总等级达到xx级
	PARAMETER_TYPE_GATHER_DEVELOP_GOD_LEL = 2,						//任意神格等级达到xx级
	PARAMETER_TYPE_GATHER_DEVELOP_RIDE_ACTIVE = 3,					//永久激活xx个坐骑
	PARAMETER_TYPE_GATHER_DEVELOP_FASHION_ACTIVE = 4,				//永久激活xx件时装
	PARAMETER_TYPE_GATHER_DEVELOP_TOP_WEAPON = 5,					//累计获得xx件传奇武器	武器类型未定
};

/*===================个人阵营公会=========================*/
enum PARAMETER_TYPE_CAMP_UNION_Parameter
{
	PARAMETER_TYPE_CAMP_UNION_CLOSENESS = 1,						//与任意好友亲密度达到xx点
	PARAMETER_TYPE_CAMP_UNION_UNION_LEL = 2,						//所在的公会等级达到xx级
	PARAMETER_TYPE_CAMP_UNION_UNION_CONTRI = 3,						//所在的公会历史最高总贡献达到xx点
	PARAMETER_TYPE_CAMP_UNION_UNION_SHILIAN = 4,					//完成xx次公会试炼
	PARAMETER_TYPE_CAMP_UNION_UNION_TRADE = 5,						//完成xx次公会贸易 跑商
	PARAMETER_TYPE_CAMP_UNION_UNION_MISSION = 6,					//完成xx次阵营事务
	PARAMETER_TYPE_CAMP_UNION_PRESTIGE = 7,							//获得xx点声望
};

/*===================个人装备养成=========================*/
enum PARAMETER_TYPE_EQUIP_DEVELOP_Parameter
{
	PARAMETER_TYPE_EQUIP_DEVELOP_A = 1,								//全身穿戴xx级以上的装备
	PARAMETER_TYPE_EQUIP_DEVELOP_B = 2,								//全身穿戴xx品质以上的装备
	PARAMETER_TYPE_EQUIP_DEVELOP_C = 3,								//全身穿戴品质紫色以上,且等级达到xx以上的装备 全身穿戴50级以上，且品质达到xx以上的装备 
	PARAMETER_TYPE_EQUIP_DEVELOP_D = 4,								//累计消耗xx张幸运卷轴
	PARAMETER_TYPE_EQUIP_DEVELOP_E = 5,								//任意装备镶嵌1颗xx级以上的宝石
	PARAMETER_TYPE_EQUIP_DEVELOP_F = 6,								//全身穿戴装备全部镶嵌满xx级以上的宝石
};

/*===================个人诺林冒险=========================*/
enum PARAMETER_TYPE_RL_RISK_Parameter
{
	PARAMETER_TYPE_RL_RISK_SJ = 1,								//累计完成xx次赏金任务（赏金挑战）
	PARAMETER_TYPE_RL_RISK_GROUP = 2,							//副本组通关xx次（例如：不老泉的初中高）
	PARAMETER_TYPE_RL_RISK_LADDER = 3,							//泰拉瑞恩达到xx层数(天梯)
	PARAMETER_TYPE_RL_RISK_WB = 4,								//累计完成xx次挖宝(不是宝图任务，只是挖宝操作)
};

enum UpdateType
{
	Update_Type_Add = 0,		//累加更新,比如任务次数
	Update_Type_Total = 1,		//总数更新,比如玩家等级，属性等
	Update_Type_Dec = 2,		//减小或减少导致的达成，比如排名
};

//成就完成信息
struct AchievementInfo
{
	uint32_t status;			//当前状态1,代表未完成，2代表完成未领取，3代表已领取
	uint32_t completeCount;     //完成数

	AchievementInfo()
	{
		status = 0;
		completeCount = 0;
	}
};

//成就大类信息
struct AchievementPlayerSortInfo
{
	uint32_t sortType;										//成就分类信息，从0开始，根据配置项来确定
	std::map<uint32_t, AchievementInfo> achievementList;	//成就列表
	uint32_t achievementReward;								//成就领取宝箱标记

	AchievementPlayerSortInfo()
	{
		sortType = 0;
		achievementList.clear();
		achievementReward = 0;
	}
};

//更新参数
struct AchievementParameterInfo
{
	uint32_t type;			//累加更新,比如任务次数,Update_Type_Add = 0,总数更新,比如玩家等级，属性等,Update_Type_Total = 1
	uint32_t parameterType;	//更新参数类型
	uint32_t parameter;		//完成参数
	uint32_t count;			//完成数量
	uint32_t objectId;		//目标ID

	AchievementParameterInfo()
	{
		type = Update_Type_Total; //默认为总数
		parameterType = 0;
		parameter = 0;
		count = 0;
		objectId = 0;
	}

	AchievementParameterInfo(uint32_t pType, uint32_t pParameterType, uint32_t pParameter, uint32_t pCount, uint32_t pObjectId)
	{
		type = pType;
		parameterType = pParameterType;
		parameter = pParameter;
		count = pCount;
		objectId = pObjectId;
	}
};


#pragma pack(pop)